/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2022-01-30 13:21:59
 * @LastEditors: GGB
 * @LastEditTime: 2022-02-01 18:46:04
 */

const QiniuManager = require("./src/utils/QiniuManager");
const { join}=require('path')
const accessKey = '5-JujtSj6tMgUq5dM1dT2XVrmalq23zifeYeDB50';
const secretKey = '3LmFeOfAt5jhXMxtCs7GAMll0dNJSWRTwuYV-KkA';
const bucket="cloud-md007"
const localFile = "C:/Users/Administrator/Documents/11.md"

const key = 'test11.md';
const downloadPath=join(__dirname,key)
const manager = new QiniuManager(accessKey, secretKey, bucket)
const Store = require('electron-store')
const settingsStore = new Store({ name: 'Settings' })
const fileStore = new Store({ name: 'Files Data' })
console.log(fileStore.get('files'))
// manager.uploadFile(key, localFile).then(data => {
//     console.log('上传成功', data)
//     // return manager.deleteFile(key)
// })
// manager.getBucketDomain().then(data => {
//     console.log(data)
// })
// manager.generateDownloadLink(key).then(data => {
//     console.log(data)
// })
// manager.downloadFile(key, downloadPath).then(() => {
//     console.log('下载写入文件完毕')
// })
// manager.renameFile('file-rename.md', 'file1.md').then(res => {
//     console.log(res)
// }).catch(err => {
//     console.log(err)
// })
// manager.getFileList().then(items=>console.log(items))